package cn.shujuhai.common.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.validation.annotation.Validated;

/**
 * 权限表
 *
 * @TableName sys_permission
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value = "sys_permission")
@Data
@AllArgsConstructor
@NoArgsConstructor
@Validated
public class SysPermission extends BaseDomain {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Long permissionId;

    /**
     * 权限名
     */
    @NotNull(message = "权限名不能为空")
    @Size(min = 1, max = 10, message = "权限名的长度只能1-10")
    private String permissionName;

    /**
     * 权限代码
     */
    @NotNull(message = "权限代码不能为空")
    @Size(min = 1, max = 50, message = "权限代码的长度只能1-50")
    private String permissionCode;

    /**
     * 描述
     */
    @NotNull(message = "权限描述不能为空")
    @Size(min = 1, max = 30, message = "权限描述的长度只能1-30")
    private String description;
    /**
     *
     */
    private Long permissionParentId;
    /**
     * 禁用状态：0启用，1禁用
     */
    private Integer status;

}